home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / pcmail / termcap / tgoto.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1.5 KB  |  105 lines

  1. /*++
  2.  
  3. /* NAME
  4.  
  5. /*      tgoto 3
  6.  
  7. /* SUMMARY
  8.  
  9. /*      absolute cursor addressing
  10.  
  11. /* PROJECT
  12.  
  13. /*      ms-dos/unix compatibility
  14.  
  15. /* PACKAGE
  16.  
  17. /*      termcap
  18.  
  19. /* SYNOPSIS
  20.  
  21. /*      char *tgoto(cm,destcol,destline)
  22.  
  23. /*      char *cm;
  24.  
  25. /*      int destcol,destline;
  26.  
  27. /* DESCRIPTION
  28.  
  29. /*      tgoto(3) returns a character string for absolute cursor addressing.
  30.  
  31. /*      Usually, the string is constructed on the basis of the "cm" capability
  32.  
  33. /*      extracted from the terminal capability database.
  34.  
  35. /*
  36.  
  37. /*      In the ms-dos implementation cursor addressing is hardwired into
  38.  
  39. /*      the tgoto(3) algorithm.
  40.  
  41. /* SEE ALSO
  42.  
  43. /*      tgetstr(3)      Extracts string capability from data base
  44.  
  45. /*      termcap(3)      Berkeley extensions to UNIX.
  46.  
  47. /* FILES
  48.  
  49. /*      ANSI.SYS, ibm pc console driver.
  50.  
  51. /* AUTHOR(S)
  52.  
  53. /*      W.Z. Venema
  54.  
  55. /*      Eindhoven University of Technology
  56.  
  57. /*      Department of Mathematics and Computer Science
  58.  
  59. /*      Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  60.  
  61. /* CREATION DATE
  62.  
  63. /*      Wed Jan  1 19:01:13 GMT+1:00 1986
  64.  
  65. /* LAST MODIFICATION
  66.  
  67. /*      90/01/22 13:57:19
  68.  
  69. /* VERSION/RELEASE
  70.  
  71. /*      2.1
  72.  
  73. /*--*/
  74.  
  75.  
  76.  
  77. #include "termcap.h"
  78.  
  79.  
  80.  
  81. /* version with wired-in cursor movement */
  82.  
  83.  
  84.  
  85. char   *tgoto(cm, destcol, destline)
  86.  
  87. char   *cm;
  88.  
  89. int     destcol;
  90.  
  91. int     destline;
  92.  
  93. {
  94.  
  95.     static char buf[100];
  96.  
  97.  
  98.  
  99.     (void) sprintf(buf, "\033[%d;%dH", destline + 1, destcol + 1);
  100.  
  101.     return buf;
  102.  
  103. }
  104.  
  105.